<?php
include("include/config.inc.php");
if(!isset($_SESSION['s_activId']))
{
  $_SESSION['s_urlRedirectDir'] = $_SERVER['REQUEST_URI'];
  header("Location:index.php");
}
else
{
	$menuIdArr = array();
  $m         = 0;
  $checkedMenuId = "SELECT userId,menuId
                      FROM usermenu
                     WHERE userId = ".$_REQUEST['userId']."
                  ORDER BY menuId";
  $checkedMenuIdRes = mysql_query($checkedMenuId);
  while($menuIdRow = mysql_fetch_array($checkedMenuIdRes))
  {
  	$menuIdArr[] = $menuIdRow['menuId'];
  	$comma_separated = implode(",", $menuIdArr);
  }

  echo $comma_separated;
  include("./bottom.php");
}
?>